Race Condition Detection for Debugging Shared-memory Parallel Programs

نویسندگان

  • ROBERT HARRY BENSON
  • Robert Harry Benson
  • Jim Larus
  • Marvin Solomon
  • Eric Bach
چکیده

This thesis addresses theoretical and practical aspects of the dynamic detecting and debugging of race conditions in shared-memory parallel programs. To reason about race conditions, we present a formal model that characterizes actual, observed, and potential behaviors of the program. The actual behavior precisely represents the program execution, the observed behavior represents partial information that can be reasonably recorded, and the potential behavior represents alternate executions possibly allowed by nondeterministic timing variations. These behaviors are used to characterize different types of race conditions, general races and data races, which pertain to different classes of parallel programs and require different detection techniques. General races apply to programs intended to be deterministic; data races apply to nondeterministic programs containing critical sections. We prove that, for executions using synchronization powerful enough to implement two-process mutual exclusion, locating every general race or data race is an NP-hard problem. However, for data races, we show that detecting only a subset of all races is sufficient for debugging. We also prove that, for weaker types of synchronization, races can be efficiently located. We present post-mortem algorithms for detecting race conditions as accurately as possible, given the constraint of limited run-time information. We characterize those races that are direct manifestations of bugs and not artifacts caused by other races, imprecise run-time traces (causing false races to appear real), or unintentional synchronization (caused by shared-memory references). Our techniques analyze the observed behavior to conservatively locate races that either did occur or had the potential of occurring, and that were unaffected by any other race in the execution. Finally, we describe a prototype data race detector that we used to analyze a sample collection of parallel programs. Experiments indicate that our techniques effectively pinpoint non-artifact races, directing the programmer to parts of the execution containing direct manifestations of bugs. In all programs analyzed, our techniques reduced hundreds to thousands of races down to four or fewer that required investigation.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

cient On - the - y Race Detection for Programs with NestedParallelism

Detecting races is important for debugging shared-memory parallel programs, because the races result in unintended nondeterministic executions of the programs. Previous monitoring techniques for on-they race detection show serious space overhead. This paper presents a new technique for on-they race detection which is more eecient in space complexity than existing techniques. The programs consid...

متن کامل

Efficient Race Condition Detection for Shared-Memory Programs with Post/Wait Synchronization

Shared-memory parallel programs are often designed to be deterministic, both in their final results and intermediate states. However, debugging such programs requires a mechanism for locating race conditions or violations of the intended determinacy when they occur. This paper answers a previously open question by presenting the first precise, efficient algorithm for dynamically detecting race ...

متن کامل

On-the-fly Detection of the First Races in Programs with Nested Parallelism

Detecting races is important for debugging shared-memory parallel programs , because the races result in unintended nondeterministic executions of the programs. Previous on-they techniques to detect races in programs with nested parallelism cannot guarantee that the race detected rst is not preceded by events that also participate in a race (occurred rst in our terminology). This paper presents...

متن کامل

Detecting the First Races in Parallel Programs with Ordered Synchronization

Detecting races is important for debugging shared-memory parallel programs, because the races result in unintended nondeterministic executions of the programs. Previous on-they techniques to detect races in programs with inter-thread coordination such as ordered synchronization cannot guarantee that the race detected rst is not preceded by events that also participate in a race. This paper pres...

متن کامل

Restructuring Parallel Programs for On-the-Fly Race Detection

Detecting races is important for debugging explicit shared-memory parallel programs, because the races result in unintended non-deterministic executions of the programs. Previous on-they techniques to detect races in parallel programs with inter-thread coordination show serious space overhead in two components of complexity, and can not guarantee that, in an execution instance, the race detecte...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1991